package com.newsee.remote.storehouse.controller;


import com.newsee.remote.common.bean.JsonResult;
import com.newsee.remote.storehouse.service.IShStorehouseService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 仓库信息前端控制器
 * </p>
 *
 * @author liangzhichen
 * @since 2019-11-06
 */
@Api("仓库信息推送接口")
@Slf4j
@RestController()
@RequestMapping("/storehouse/sh-storehouse")
public class ShStorehouseController {

    private final IShStorehouseService storeHouseService;

    public ShStorehouseController(IShStorehouseService storeHouseService) {
        this.storeHouseService = storeHouseService;
    }

    @ApiOperation(value = "增量推送仓库信息接口")
    @GetMapping
    public JsonResult pushStoreHouse(@RequestParam(required = false) String startTime, @RequestParam(required = false) String endTime) {
        log.info("增量推送仓库信息接口");
        return storeHouseService.pushStoreHouse(startTime, endTime);
    }

}
